﻿[output_none]

	[if:(action_param:'pageform_title')!='' && (action_param:'pageform_content')!='']
	
		[var:'pageform_title'=(encode_sql:(action_param:'pageform_title'))]
		[var:'pageform_content'=(encode_sql:(action_param:'pageform_content'))]
		[var:'pageform_lang'=(encode_sql:(action_param:'pageform_lang'))]
		[if:(action_param:'pageform_page')==''][var:'pageform_page'=1][else][var:'pageform_page'=(encode_sql:(action_param:'pageform_page'))][/if]

		[var:'sql_save_pages'='
			UPDATE		SHb_translations_pages
			SET			page_title		= \'' + $pageform_title + '\'
						, page_content	= \'' + $pageform_content + '\'
			WHERE		_k2_pageid		= \'' + $pageform_page + '\'
			AND			_k2_languageid	= \'' + $pageform_lang + '\'
		']
			
			
		[Inline: -database='SHoebox', -sql=$sql_save_pages]
		
			[if:(error_currenterror:-errorcode)==0]
				[var:'output_message'='Page Saved']
			[else]
				[var:'output_message'='An error occured while saving']
			[/if]
			
		[/inline]
	
	[else]
	
		[var:'output_message'='An error occured while saving']
		
	[/if]
	
[/output_none]	
<b>[var:'output_message',-encodenone]</b>